﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace SportsPlatform.Query.Competition
{
    /// <summary>
    /// 赛事编辑传入参数
    /// </summary>
    public class EditCompetitionQuery
    {
        public Guid? Id { get; set; }

        /// <summary>
        /// 赛事名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 所属商户
        /// </summary>
        public Guid? Merchants { get; set; }

        /// <summary>
        /// 封面图
        /// </summary>
        [Required]
        public string CoverPicture { get; set; }

        /// <summary>
        /// 轮播图
        /// </summary>
        [Required]
        public string RotationPicture { get; set; }

        /// <summary>
        /// 举办城市
        /// </summary>
        [Required]
        public string City { get; set; }

        /// <summary>
        /// 举办地点
        /// </summary>
        [Required]
        public string Address { get; set; }

        /// <summary>
        /// 举办详细地址
        /// </summary>
        [Required]
        public string DetailsAddress { get; set; }

        /// <summary>
        /// 报名开始时间
        /// </summary>
        [Required]
        public DateTime SignUpBeginTime { get; set; }

        /// <summary>
        /// 报名结束时间
        /// </summary>
        [Required]
        public DateTime SingUpEndTime { get; set; }

        /// <summary>
        /// 比赛开始时间
        /// </summary>
        [Required]
        public DateTime MatchBeginTime { get; set; }

        /// <summary>
        /// 比赛结束时间
        /// </summary>
        [Required]
        public DateTime MatchEndTime { get; set; }

        /// <summary>
        /// 咨询人
        /// </summary>
        [Required]
        public string Consultant { get; set; }

        /// <summary>
        /// 咨询电话
        /// </summary>
        [Required]
        public string TelePhone { get; set; }

        /// <summary>
        /// 赛事状态（0：关闭；1：待发布；2：报名未开始；3：正在报名；4：报名结束待比赛；5：正在比赛；6：比赛结束）
        /// </summary>
        [Required]
        public int State { get; set; }

        /// <summary>
        /// 是否启用（0：禁用；1：启用）
        /// </summary>
        [Required]
        public int IsEnable { get; set; }

        /// <summary>
        /// 活动详情
        /// </summary>
        public string Details { get; set; }

        /// <summary>
        /// 赛事须知
        /// </summary>
        public string Instructions { get; set; }

        /// <summary>
        /// 详细地址坐标点
        /// </summary>
        public string Point { get; set; }

        /// <summary>
        /// 收费类型（1：按项目收费；2：按赛事收费）
        /// </summary>
        [Required]
        public int ChargeType { get; set; }

        /// <summary>
        /// 费用（元/人）
        /// </summary>
        public decimal? Money { get; set; }

        /// <summary>
        /// 主办单位
        /// </summary>
        public List<CompetitionUnitQuery> HostUnit { get; set; }

        /// <summary>
        /// 承办单位
        /// </summary>
        public List<CompetitionUnitQuery> UndertakeUnit { get; set; }

        /// <summary>
        /// 协办单位
        /// </summary>
        public  List<CompetitionUnitQuery> AssistingUnit { get; set; }

    }

    /// <summary>
    /// 赛事单位
    /// </summary>
    public class CompetitionUnitQuery
    {
        /// <summary>
        /// 单位名称
        /// </summary>
        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 单位LOGO
        /// </summary>
        [Required]
        public string LogoUrl { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        [MaxLength(20)]
        public string Responsible { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [MaxLength(20)]
        public string TelePohone { get; set; }
    }

    /// <summary>
    /// 关闭赛事传入参数
    /// </summary>
    public class CompetitionIdQuery
    {
        /// <summary>
        /// 赛事Id
        /// </summary>
        public Guid Id { get; set; }
    }

}
